//
//  MOWaitDoDetail_HuiQianViewCell.m
//  MobileOffice
//
//  Created by 冰冰 on 2019/8/5.
//  Copyright © 2019 com.idolmedia. All rights reserved.
//

#import "MOWaitDoDetail_HuiQianViewCell.h"

@interface MOWaitDoDetail_HuiQianViewCell ()

@property(nonatomic,strong)UILabel *nameLabel;

@property(nonatomic,strong)UILabel *companyLabel;

@property(nonatomic,strong)UILabel *dateLabel;

@end

@implementation MOWaitDoDetail_HuiQianViewCell

+(instancetype)cellWithTableView:(UITableView *)tableView andIndexPath:(NSIndexPath *)indexPath
{
    //NSString *ID = [NSString stringWithFormat:@"Cell%ld%ld",(long)[indexPath section],(long)[indexPath row]];
    NSString *ID = @"MOWaitDoDetail_HuiQianViewCell";
    MOWaitDoDetail_HuiQianViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil){
        cell = [[MOWaitDoDetail_HuiQianViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        [cell creatView];
    }
    return cell;
}

-(void)creatView{
    [self addSubview:self.nameLabel];
    [self addSubview:self.companyLabel];
    [self addSubview:self.dateLabel];
}

-(void)setDataDic:(NSDictionary *)dataDic
{
    self.nameLabel.attributedText = [NSString contentString:[NSString stringWithFormat:@"会签人姓名：%@",[NSString passNullForString:dataDic[@"hqrxm"]]] subString:[NSString passNullForString:dataDic[@"hqrxm"]] subColor:KBlackColor_222222 subFont:FONT_SIZE(14)];
    
    if (dataDic[@"dwmc"]) {
        self.companyLabel.attributedText = [NSString contentString:[NSString stringWithFormat:@"会签人单位：%@",[NSString passNullForString:dataDic[@"dwmc"]]] subString:[NSString passNullForString:dataDic[@"dwmc"]] subColor:KBlackColor_222222 subFont:FONT_SIZE(14)];
    }
    
    if (dataDic[@"hqdwmc"]){
        self.companyLabel.attributedText = [NSString contentString:[NSString stringWithFormat:@"会签人单位：%@",[NSString passNullForString:dataDic[@"hqdwmc"]]] subString:[NSString passNullForString:dataDic[@"hqdwmc"]] subColor:KBlackColor_222222 subFont:FONT_SIZE(14)];
    }
    self.dateLabel.attributedText = [NSString contentString:[NSString stringWithFormat:@"会签时间：%@",[NSString passNullForString:dataDic[@"hqsj"]]] subString:[NSString passNullForString:dataDic[@"hqsj"]] subColor:KBlackColor_222222 subFont:FONT_SIZE(14)];
}

-(UILabel *)nameLabel
{
    if (!_nameLabel) {
        _nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(17, 17, SCREEN_WIDTH - 34, 16)];
        _nameLabel.font = FONT_SIZE(14);
        _nameLabel.textColor = KBlackColor_919395;
    }
    return _nameLabel;
}

-(UILabel *)companyLabel
{
    if (!_companyLabel) {
        _companyLabel = [[UILabel alloc]initWithFrame:CGRectMake(17, _nameLabel.bottom + 10, SCREEN_WIDTH - 34, 16)];
        _companyLabel.font = FONT_SIZE(14);
        _companyLabel.textColor = KBlackColor_919395;
    }
    return _companyLabel;
}

-(UILabel *)dateLabel
{
    if (!_dateLabel) {
        _dateLabel = [[UILabel alloc]initWithFrame:CGRectMake(17, _companyLabel.bottom + 10, SCREEN_WIDTH - 34, 16)];
        _dateLabel.font = FONT_SIZE(14);
        _dateLabel.textColor = KBlackColor_919395;
    }
    return _dateLabel;
}

@end
